#include <iostream>
using std::cout;
using std::endl;

class FunctionObject{
public:
    void operator()(){
        cout << "void operator()()" << endl;
        ++_count;
    }

    int operator()(int x,int y){
        ++_count;
        return x+y;
    }

    double operator()(double x,double y){
        ++_count;
        return x + y;
    }

    int _count = 0;
};

void test0(){
    FunctionObject fo;
    fo();
    cout << fo(1,2) << endl;
    cout << fo(2.1,9.2) << endl;
    cout << fo._count << endl;
}

int main(int argc, char * argv[])
{
    test0();
    return 0;
}


